#!groovy
@Library(["pipeline-library@master"]) _

node("jenkins-slave-ansible") {
    stage("SETUP: Set logging to verbose") {
        openshift.logLevel(10)
    }

    stage("TEST: Run applier for 'build-s2i-executable' and fail") {
        withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'pipelinelib-testing-my-token', usernameVariable: 'USERNAME', passwordVariable: 'TOKEN']]) {
            applier([
                    inventoryPath   : ".applier/hosts",
                    requirementsPath: "requirements.yml",
                    ansibleRootDir  : "${WORKSPACE}/containers-quickstarts/build-s2i-executable",
                    applierPlaybook : "galaxy/openshift-applier/playbooks/openshift-cluster-seed.yml",
                    secretName      : "doesnt-exist",
            ])
        }
    }
}
